home *** CD-ROM | disk | FTP | other *** search
Wrap
/* Program Written By Bruce Steers <bsteers@ukonline.co.uk> */ ver='$VER: Aminet.awnp 1.9 (18.04.00)' /* Using AWNPipe by William Parker <Bill@amitrix.com> */ /* AND Clipper By Bruce Steers <bsteers@ukonline.co.uk> */ vern=word(ver,3) if ~show('l','rexxsupport.library') then call addlib('rexxsupport.library',0,-30,0) if ~show('l','rexxdossupport.library') then call addlib('rexxdossupport.library',0,-30,0) if ~showlist(h,'AWNPIPE') then address command 'mount awnpipe:' if ~showlist(h,'AWNPIPE') then do; say locales(MSG_Errorwith)' Awnpipe: Device..' ; exit(1); end ibase=showlist(l,'intuition.library',,a) call forbid; scrA=next(ibase,56) scrW=c2d(IMPORT(offset(scrA,12),2)) scrH=c2d(IMPORT(offset(scrA,14),2)) screen=word(IMPORT(next(scrA,26)),1) call permit WIN='0 10 'scrW' 100' PWIN='0 10 'scrW' 100' parse source . . . prog . lp=max(lastpos('/',prog),lastpos(':',prog)) parse var prog progpath +lp progname progname=strip(progname) prefsname=progpath'Aminet.awnp.cfg' LF='0A'x ; CRLF='0A0D'x chprf=0; noget=1; wait=0 parse value with NAME SetIn call BuildStrings() call getfont() call loadprefs() parse arg args if args=='?' then do; if index(address(),'AMIRC.')==1 then do 'echo Aminet.awnp By Bruce Steers' 'echo ReadArgs Help..' 'echo 'locales(MSG_ArgHelp)' NAME,LENGTH/N,DIR/K,SITE/N,README/T,ASKDIR/T,BUBBLE/T,WAIT/S' exit end else do call writech(STDOUT,locales(MSG_ArgHelp) || LF'NAME,LENGTH/N,DIR/K,SITE/N,README/T,ASKDIR/T,BUBBLE/T,WAIT/S,WIN/K,PWIN/K : ') args=readln(STDIN) end end call readargs(args,'NAME,LENGTH/N,DIR/K,SITE/N,README/T,ASKDIR/T,BUBBLE/T,WAIT/S,WIN/K,PWIN/K') call storedefs() call buildgui() if (name~='') & wait==0 then do; call topipe('id 0 s 256'); call searchfunc; call topipe('id 'lvw' list 1'); call topipe('id 'inf' defn 0 gt "'labinfo'"'); call topipe('id 0 s 512'); call topipe('id 'ptn' s 0'); end do while ~eof(pipe) call writeln(pipe,'id 0 read'); WIN=readln(pipe); call topipe('con') in=readln(pipe) parse var in in1 in2 in3 in4 in5 in6 select when in1=='' then nop when in1=='iconify' then call topipe('id 0 s '64-(32*in2)) when in1=='menu' then call menu() when in1=='close' then nop when in1=='help' then if bubble==1 then call help() when in1=='gadget' then call gadget() otherwise say in end end if chprf | (O_LENGTH==LENGTH & O_PWIN==PWIN & O_WIN==WIN & O_README==README & O_DIR==DIR & O_ASKDIR==ASKDIR & O_SITE==SITE & O_BUBBLE==BUBBLE)==0 then if req('"" "'locales(MSG_ChPrf)'"') then call saveprefs() call close(pipe) exit(0) menu: select when in3==0 then call req('"" "Aminet.awnp*n'ver'*n*nBruce Steers <bsteers@ukonline.co.uk>*n*nhttp://web.ukonline.co.uk/bsteers/*nhttp://web.ukonline.co.uk/awnpipe/" "'locales(MSG_OK)'"') when in3==2 then do; if in5==0 & bubble==1 then call topipe('bubble'); bubble=in5; end when in3==4 then call prefs() when in3==6 then call newver() when in3==8 then exit otherwise nop end return gadget: select when in2==xit then nop /*do; address command 'run rx 'prog; exit; end*/ when in2==prf then call prefs() when in2==sch then do; call topipe('id 0 s 256'); call searchfunc; call topipe('id 'lvw' list 1'); call topipe('id 'inf' defn 0 gt "'labinfo'"'); call topipe('id 0 s 512'); call topipe('id 'ptn' s 0'); end when in2==get then do; call topipe('id 0 s 256'); call getfile(); call topipe('id 0 s 512'); end when in2==sng then do; site=in3+1; parse var ams.site '://'amd'/' .; end when in2==ptn then do; parse var in . . name; name=strip(name); if name=='' then do; call topipe('id 'sch' dis 1'); return; end; call topipe('id 'sch' dis 0'); end when in2==hit then length=in3 when in2==rec then call recent() when in2==rme then readme=in3 when in2==dlp then askdir=in3 when in2==vrm then call viewr() when in2==lvw then do if noget then do; noget=0; call topipe('id 'get' dis 0');call topipe('id 'vrm' dis 0'); end nodeat=bnode.in5 nodein=in5 parse var nodes.nodeat.line amname amtype . if in3==16 then do ans=req('"" "'locales(MSG_SELFUNC)'" gadgets "'locales(MSG_VIEWR)'" "'locales(MSG_GET)'" "'locales(MSG_ABORT)'"') if ans==1 then call viewr() if ans==2 then call getfile() end end otherwise nop end return help: if in2>0 then; call topipe('bubble top 'in3' left 'in4' gt "'hlp.in2'"') else; call topipe('bubble') return mhlp: hlp.rec=locales(HLP_REC) hlp.inf=locales(HLP_INF) hlp.xit=locales(HLP_XIT) hlp.sch=locales(HLP_SCH) hlp.vrm=locales(HLP_VRM) hlp.get=locales(HLP_GET) hlp.ptn=locales(HLP_PTN) hlp.hit=locales(HLP_HIT) hlp.rme=locales(HLP_RME) hlp.dlp=locales(HLP_DLP) hlp.sng=locales(HLP_SNG) hlp.lvw=locales(HLP_LVW) return buildgui: labinfo='Bruce Steers <bsteers@ukonline.co.uk>' if ~open(pipe,'awnpipe:Aminet.awnp/xc') then exit(2) parse var WIN winl wint winw winh . call topipe('"Aminet.awnp 'locales(MSG_SEARCHFIND) vern' Bruce" defg left 'winl' top 'wint' width 'winw' height 'winh' a v si so h m ig it "AmFind.Zzz" ii "'prog'" ps "'screen'" st "Aminet.awnp 'locales(MSG_SEARCHFIND) vern' By Bruce Steers <bsteers@ukonline.co.uk>"') if bubble then ch='&'; else; ch='%' men=locales(MNU_MENU) men=translate(men,ch,'¶') call writeln(pipe,'TextAttr gt "'gfont'" defn 'gfsize'');tmp=readln(pipe); parse var tmp . gfontid gfontA . call writeln(pipe,'TextAttr gt "'lfont'" defn 'lfsize'');tmp=readln(pipe); parse var tmp . lfontid lfontA . call topipe('menu gt "'men'"') rqg =topipe('getfile ua save fn "'dir'" i dr gt "'locales(DL_PATH)'"') call topipe('layout weih 0 b 5') inf =topipe('FuelGauge cj gt "'labinfo'" defn 0 maxn 100') call topipe('le') lvw =topipe('listbrowser font 'lfontid' tc noms weih 100 st a v lbl "'locales(MSG_LISTLABELS)'"') call topipe('layout weih 0 font 'gfontid' b 0 si so') rec =topipe('button tc weiw 0 gt "'locales(MSG_RECENT)'"') vrm =topipe('button tc weiw 0 gt "'locales(MSG_README)'" dis 1') get =topipe('button tc weiw 0 gt "'locales(MSG_GET)'" dis 1') sch =topipe('button tc weiw 0 gt "'locales(MSG_SEARCH)'" dis 1') ptn =topipe('string tc lj gt "'name'"') call topipe('label gt "*n*n 'locales(LAB_MAXHITS)':"') hit =topipe('integer tc minn 1 maxn 500 weiw 0 minc 3 defn 'length' a') call topipe('le') call topipe('layout font 'gfontid' weih 0 b 0 so') call topipe('label gt "*n*n 'locales(LAB_GetR)':"') rme =topipe('checkbox s 'readme'') call topipe('label gt "*n*n 'locales(LAB_ASKD)':"') dlp =topipe('checkbox s 'askdir'') call topipe('label gt " "') sng =topipe('chooser s 'site-1' tc pu cl 'do_srvlst()'') call topipe('label gt " "') xit =topipe('button font='gfontid' tc weiw 0 gt "'locales(MSG_QUIT)'" c') call topipe('le') call topipe('open') call mhlp() call topipe('id 'ptn' s 0') return do_srvlst: srvlst='"' do c=1 to ams0; parse var ams.c '://'adr'/' . srvlst=srvlst'('c')'copies(' ',2-length(c))||adr'|'; end srvlst=substr(srvlst,1,length(srvlst)-1)'"' return srvlst topipe: parse arg out call writeln(pipe,out); res=readln(pipe) parse var res res1 res2 . if res1='ok' then return(res2) say 'error from: 'out; say ' responce: ' res; exit searchfunc: sport='tcp:'amd'/1848' call clear() call topipe('id 'lvw' list 0'); call setinf(locales(MSG_CON2)' 'amd) if open(1,sport,'W') then do; call setinf(locales(MSG_OKSENDING)) call writeln(1,'max 'length) call writeln(1,'find 'name) call writeln(1,'max') setinf(locales(MSG_READREP)) preinf=locales(MSG_SEARCHING) do until eof(1) text=readln(1) if text='Missing argument.' then leave if left(text,27)='*** No matching files found' then do call req('"" "'name locales(MSG_NOMATCH)'" "'locales(MSG_OK)'"') call close(1) return end if index(text,'*** Additional matches omitted.')==1 then do call req('"" "'locales(MSG_MORETHAN) || length')" "'locales(MSG_OK)'"') call close(1) return end else do; call addn(text) end end end else; call req('"" "'locales(MSG_ERROR)'*n'locales(MSG_CON2)'*n'amd'!" "'locales(MSG_OK)'"'); call close(1) call setinf(locales(MSG_SEARCHEND)) return clear: drop nodes. drop bnode. cnt=0 call topipe('id 'lvw' s 0') call topipe('id 'lvw' remn') call topipe('id 'get' dis 1') call topipe('id 'vrm' dis 1') noget=1 return addn: outt=space(arg(1),1) do c=1 to 4; p=index(outt,' '); outt=delstr(outt,p,1); outt=insert('|',outt,p-1); end outt=restr(outt) nn = topipe('id 'lvw' addn gt "'outt'"') cnt=cnt+1 nodes.cnt.node=nn nodes.cnt.line=arg(1) bnode.nn=cnt if arg(2)=='' then call updateguage(cnt,length) return restr: PROCEDURE; rt=arg(1) p=1; do while p>0; p=index(rt,'*',p); if p~=0 then do rt=insert('*',rt,p-1); p=p+2 end end return rt setinf: if arg(1)~='' then call topipe('id 'inf' gt "'arg(1)'"') else; call topipe('id 'inf' defn 0 gt "'labinfo'"') return(0) updateguage: per = 100 * ( arg(1) / arg(2) ) ; dotp = index(per,'.'); if dotp~=0 then per=left(per,dotp-1) call topipe('id 'inf' defn 'per' gt "'preinf'('per'%) 'arg(1)'/'arg(2)'"') return getfile: if askdir then; if ~reqdir(dir) then return if ~download(ams.site||amtype'/'amname) then return if readme then if ~download(ams.site||amtype'/'substr(amname,1,length(amname)-3)'readme') then return call topipe('id 'nodein' remn'); call topipe('id 'get' dis 1'); call topipe('id 'vrm' dis 1'); nodeat=0 noget=1 return download: parse arg url if right(dir,1)~=':' then if right(dir,1)~='/' then dir=dir'/' lp=max(lastpos(':',url),lastpos('/',url)) parse var url ddir +lp filename . parse var url '://'serv'/' . call setinf(locales(MSG_CON2) serv'...') if ~open(infile,'tcp:'serv'/80','W') then do; call req('"" "'locales(MSG_ERROR)'*n'locales(MSG_CON2)'*n'serv'!" "'locales(MSG_OK)'"'); return 0; end call setinf(locales(MSG_GETTING) URL) call setinf(locales(MSG_SAVEAS) dir||filename'.') call writech(infile,'GET 'url 'HTTP/1.0'||CRLF) call writech(infile,CRLF) if ~open(outfile,dir || filename,'W') then do; call close(infile); call req('"" "'locales(MSG_ERROR)'*n'locales(MSG_SAVEAS)'*n'path'" "'locales(MSG_OK)'"'); return 0; end size=0; afile=0 ; flines=0 do until eof(infile) IF afile==0 then do ln=readln(infile); select when index(upper(ln),'CONTENT-LENGTH:')==1 then do; max=substr(ln,17); max=compress(max,crlf); end when index(upper(ln),'CONTENT-TYPE:')==1 then do; type=substr(ln,15); type=compress(type,crlf); end when ln=='' then do; afile=1; preinf=type'. ' end otherwise nop end end else do; olen = writech(outfile,readch(infile,1024)) size=size+olen if olen~=0 then call updateguage(size,max) end end call close(outfile) ; call close(infile) call topipe('id 'inf' defn 0 gt "'labinfo'"'); return 1 reqdir: call writeln(pipe,'id 'RQG' s 1'); res=readln(pipe); if res==0 then return 0; dir=strip(strip(delstr(res,1,2)),,'"'); return 1 req: parse arg args PUBSCREEN=screen call readargs(args,'TITLE,BODY,GADGETS/M,PUBSCREEN/K') if title=="" | title=='TITLE' then TITLE='Aminet.awnp'; if body=="" | body=='BODY' then BODY='Are you sure ?' if GADGETS.COUNT==0 | GADGETS.COUNT=='GADGETS.COUNT' then do; GADGETS.0=locales(MSG_YES); GADGETS.1=locales(MSG_NO); GADGETS.COUNT=2; end if ~open('req','awnpipe:AWNPChoice'time(s)'/xc') then exit(2) call toreq('"'TITLE'" width 150 sk m db dg v a ps "'PUBSCREEN'"') p=1; do while p>0; p=index(body,'0A'X); if p~=0 then do; body=delstr(body,p,1); body=insert('*n',body,p-1); end; end call toreq('layout si so cj b 5'); call toreq('space'); call toreq('label gt "*n'body'*n" underscore="¿"'); call toreq('space'); call toreq('le') spos=toreq('layout cj si so b 1'); if GADGETS.COUNT == 1 then call toreq('space') do c=0 to GADGETS.COUNT - 1; call toreq('button weiw 0 gt "'GADGETS.c'" c'); end if GADGETS.COUNT == 1 then call toreq('space'); call toreq('le') call toreq('open') do while ~eof('req') call toreq('con') in=readln('req') parse var in in1 in2 in3 in4 in5 select when in1=='gadget' then if in2==(spos + GADGETS.COUNT) then ans=0; else; ans=in2-spos when in1=='key' & (in2==68 | in2==69) then do; ans=(in2==68); call close('req'); return ans;end otherwise nop end end call close('req') return ans toreq: parse arg out; call writeln('req',out); res=readln('req'); parse var res res1 res2 .; if res1='ok' then return(res2); say 'error from: 'out; say ' responce: ' res; exit infoline: if index(amname,'-------')==1 then; return 1; return 0 viewr: if infoline() then return req('"" "'locales(MSG_ERROR)'*n'locales(MSG_NOFILESEL)'" "'locales(MSG_OK)'"') opath=dir dir='T:' rmename=substr(amname,1,length(amname)-3)'readme' if download(ams.site||amtype'/'rmename) then do call topipe('id 0 s 256') call topipe('id 'inf' defn 0') call open(vh,'awnpipe:viewreadme/xc') call writeln(vh,'"T:'rmename'" width 'scrw' height 200 tl cg dg sg db ig v a') call writeln(vh,'textfield gt 0 arrows ro bd datain "T:'rmename'"') call writeln(vh,'open') do while ~eof(vh) call readln(vh) end call close(vh) call topipe('id 0 s 512') end call delete('t:'rmename) dir=opath return prefs: call open(sh,'awnpipe:servers/xc') parse var PWIN pwinl pwint pwinw pwinh . call topipe('id 0 s 128') call topipe2('"'locales(MSG_AMIPRF)'" defg v a m left='pwinl' top='pwint' width='pwinw' height 'pwinh'') lb2 =topipe2('listbrowser a font 'lfontid' h st noms lbl "'locales(MSG_AMIADR)'"') htps =topipe2('string font 'gfontid' lj tc') call topipe2('layout weih 0 font 'gfontid' si so b 5') adg =topipe2('button gt "'locales(MSG_ADDSERV)'"') rmg =topipe2('button gt "'locales(MSG_REMSERV)'"') call topipe2('le') call topipe2('open') call snodes() call diss(1) do while ~eof(sh) call writeln(sh,'id 0 read'); PWIN=readln(sh); call topipe2('con') ln=readln(sh) parse var ln in1 in2 in3 in4 in5 in6 . if in1=='gadget' then call sgads() else; nop end call close(sh) SetIn="" call topipe('id 0 s 64') return sgads: select when in2==lb2 then call seld(in5) when in2==htps then do if in3~=ams.sat then do ams.sat=in3 call topipe2('id 'SetIn' gt "'ams.sat'"') call topipe('id 'sng' cl 'do_srvlst()'') call topipe2('id 'lb2' sort 0') call topipe2('id 'lb2' s 'SetIn'') if sat==site then parse var ams.sat '://'amd'/' . chprf=1 end end when in2==adg then do ams0=ams0+1; ams.ams0='http://' sat=ams0 nm=topipe2('id 'lb2' addn gt "'ams.ams0'"') snode.nm=ams0 call topipe2('id 'lb2' s 'nm);call seld(nm) call topipe('id 'sng' cl 'do_srvlst()'') chprf=1 end when in2==rmg then do; call topipe2('id 'lb2' s=0') do c=sat to ams0; c1=c+1 if c==ams0 then ams.c="" else; ams.c=ams.c1 end ams0=ams0-1 call snodes() call topipe('id 'sng' cl 'do_srvlst()'') call topipe2('id 'htps' gt "" ref'); call diss(1); SetIn="" chprf=1; end otherwise nop end return snodes: drop snode. call topipe2('id 'lb2' remn'); call topipe2('id 'lb2' list 0'); do c=1 to ams0 num=topipe2('id 'lb2' addn gt "'ams.c'"') snode.num=c end call topipe2('id 'lb2' list 1'); return seld: if SetIn=="" then call diss(0) SetIn=arg(1) sat=snode.SetIn call topipe2('id 'htps' gt "'ams.sat'" ref') return diss: di=arg(1) call topipe2('id 'htps' dis 'di' ref') if ams.sat=="" | ams.ams0==1 then do; di=1; SetIn=""; end call topipe2('id 'rmg' dis 'di' ref') return topipe2: parse arg out call writeln(sh,out); res=readln(sh) parse var res res1 res2 . if res1='ok' then return(res2) say 'error from: 'out; say ' responce: ' res; exit loadprefs: if ~exists( prefsname ) then do LENGTH=20; DIR='Ram:'; SITE=3; BUBBLE=1; README=1; ASKDIR=1; WIN='0 10 'scrW' 100'; PWIN='0 10 'scrW' 100'; ams.1='http://ftp.uni-paderborn.de/~aminet/dirs/aminet/' ams.2='http://ftp.wustl.edu/~aminet/dirs/aminet/' ams.3='http://uk.aminet.net/aminet/dirs/aminet/' ams0=3 if req('"" "'locales(MSG_NoPrf1)'*n'prefsname'*n'locales(MSG_NoPrf2)'"') then call saveprefs() end if open(ph,prefsname) then do pl=readln(ph) call readargs(pl,'LENGTH/N,DIR/K,SITE/N,BUBBLE/T,README/T,ASKDIR/T,WIN/K,PWIN/K') ams0=0 do while ~eof(ph) ln=readln(ph) if ln~="" then do ams0=ams0+1 if index(ln,' ')~=0 then; parse var ln . ams.ams0 . else; ams.ams0=ln end end call close(ph) end site=min(ams0,max(site,1,site)) parse var ams.site '://'amd'/' . call storedefs() return saveprefs: if ~open(ph,prefsname,'W') then do; call req('"" "'locales(MSG_ERROR)'*n'locales(MSG_SAVEP)'" "'locales(MSG_OK)'"'); return; end; call writeln(ph,'LENGTH 'length' DIR 'dir' SITE 'site' BUBBLE='word('OFF ON',bubble+1)' README 'word('OFF ON',readme+1)' ASKDIR 'word('OFF ON',askdir+1)' WIN "'WIN'" PWIN "'PWIN'"') do c=1 to ams0 call writeln(ph,ams.c) end call close(ph) return storedefs: O_LENGTH=LENGTH O_README=README O_DIR=DIR O_ASKDIR=ASKDIR O_SITE=SITE O_BUBBLE=BUBBLE O_WIN=WIN O_PWIN=PWIN return newver: opath=dir; got=0 dir='T:' if download('http://web.ukonline.co.uk/bsteers/versions.dat') then do call open(dh,'t:versions.dat') do while ~eof(dh) & got==0 dln=readln(dh) if word(dln,2)=='Aminet.awnp' then got=1 end call close(dh) call delete('t:versions.dat') if got==0 then do; dir=opath; call req('"" "'locales(MSG_NOVERINF)'" "'locales(MSG_OK)'"');return; end if word(dln,3)>vern then do st=locales(MSG_NEWVER) st=insert(' 'word(dln,3),st,index(st,'*n')-1) if req('"" "'st'" "'locales(MSG_DOWNLOAD)'" "'locales(MSG_LEAVE)'"') then do if reqdir('ram:') then call download(substr(dln,index(dln,')')+2)) end end else; call req('"" "'locales(MSG_LATEST)'" "'locales(MSG_OK)'"') end dir=opath return recent: opath=dir dir='T:'; day=2 call clear() if download(ams.site'RECENT') then do call setinf(locales(MSG_READREC)) call open('th','T:RECENT') call readln('th'); call readln('th'); call readln('th'); call readln('th'); call readln('th'); lines=0; locday=locales(MSG_DAY) call topipe('id 'lvw' remn'); call topipe('id 'lvw' list 0'); call addn('-------'locday'-1------ --- ---- --- ---'locday'-1---',0) do while ~eof('th') text=readln('th') if substr(text,35,1)=='+' then do; text=insert(' ',insert(' ',text,34),37); lines=lines+1; end else do;if ~eof('th') then;text='-------'locday'-'day'------ --- ---- --- ---'locday'-'day'---'; else; text='------------------ --- ---- --- -----------'; day=day+1; end call addn(text,0) end call topipe('id 'lvw' list 1'); call close('th') call delete('t:RECENT') end else; call req('"" "'locales(MSG_ERROR)'*n'locales(MSG_NORECENT)'" "'locales(MSG_OK)'"') call setinf() dir=opath return /* Read default strings, open locale.library and catalog Thanks to Nils Goers for letting me use this code from his WB tool T.H.E */ BuildStrings: CALL BuildInLanguage() /* install build-in language */ IF ~SHOW('l','locale.library') THEN CALL ADDLIB('locale.library',0,-30,0) IF SHOW('l','locale.library') THEN DO catalog=0 id='req'pragma('id') /* get current language */ address command 'rxset' id '`echo $language`' language=getclip(id) call setclip(id,'') IF (language ~= '') & (language~='$language') THEN DO catalog = OPENCATALOG(progpath'catalogs/'language'/Aminet.awnp.catalog','english',0) IF catalog == 0 THEN catalog = OPENCATALOG(progpath'Aminet.awnp.catalog','english',0) END IF catalog == 0 THEN catalog = OPENCATALOG('Aminet.awnp.catalog','english',0) END RETURN locales: PARSE ARG stringnumber IF stringnumber=="" then Return('LocaleErr') IF catalog ~= 0 THEN; RETURN(GETCATALOGSTR(catalog,stringnumber,strings.stringnumber)) ELSE; RETURN(strings.stringnumber) BuildInLanguage: MSG_ERRORWITH = 0 ; strings.0 ='Error With.. ' MSG_ARGHELP = 1 ; strings.1 ='Args with /T are Toggle , eg, use README=ON to activate' MSG_NOPRF1 = 2 ; strings.2 ='did not find file' MSG_NOPRF2 = 3 ; strings.3 ='Should I Create a New one ?' MSG_CHPRF = 4 ; strings.4 ='Settings Have Been Changed*nDo you want to Remember Changes' MSG_YES = 5 ; strings.5 ='_Yes' MSG_NO = 6 ; strings.6 ='_No' MSG_OK = 7 ; strings.7 ='_OK' MSG_SELFUNC = 8 ; strings.8 ='Select A function' MSG_VIEWR = 9 ; strings.9 ='_View Readme' MSG_GET = 10; strings.10 ='_Get' MSG_ABORT = 11; strings.11 ='_Abort' MSG_SEARCHFIND = 12; strings.12 ='Searcher/Finder' MNU_MENU = 13; strings.13 ='Main|@?About Aminet.awnp|-|@B^¶Bubble Help|-|@SServers|-|@Vcheck www for Newer Version|-|@QQuit' MSG_DL_PATH = 14; strings.14 ='Download Path' MSG_LISTLABELS = 15; strings.15 ='Archive Name|Type|Size|Age|Info' MSG_RECENT = 16; strings.16 ='Re_cent' MSG_SEARCH = 17; strings.17 ='_Search' LAB_MAXHITS = 18; strings.18 ='MaxHits' MSG_README = 19; strings.19 ='_Readme' LAB_GETR = 20; strings.20 ='Get Readme' LAB_ASKD = 21; strings.21 ='Ask For Dir' MSG_QUIT = 22; strings.22 ='_Quit' MSG_CON2 = 23; strings.23 ='Connecting to' MSG_OKSENDING = 24; strings.24 ='Connected .. Sending search info' MSG_READREP = 25; strings.25 ='Reading Replies' MSG_SEARCHING = 26; strings.26 ='Searching ....' MSG_NOMATCH = 27; strings.27 ='*nThis name did not return any matches*n(OR maybe the server isn''t Working ?)' MSG_MORETHAN = 28; strings.28 ='Note...*nSearch found more entries than*nthe Specified (' MSG_SEARCHEND = 29; strings.29 ='Search Has Finished...' MSG_GETTING = 30; strings.30 ='Getting' MSG_SAVEAS = 31; strings.31 ='Saving As' MSG_NOFILESEL = 32; strings.32 ='You Don''t have a file selected!' MSG_ERROR = 33; strings.33 ='Error !!!' MSG_AMIPRF = 34; strings.34 ='Aminet Server Settings' MSG_AMIADR = 35; strings.35 ='Addresses of Aminet Sites' MSG_ADDSERV = 36; strings.36 ='_Add New Server' MSG_REMSERV = 37; strings.37 ='_Remove Server' MSG_SAVEP = 38; strings.38 ='Saving Prefs' MSG_NOVERINF = 39; strings.39 ='An unknown error has occured :(*nCan not find any*ninfo for this program.' MSG_NEWVER = 40; strings.40 ='A Newer Version*nIs Currently Available :)' MSG_DOWNLOAD = 41; strings.41 ='_Download' MSG_LEAVE = 42; strings.42 ='_Leave Alone' MSG_LATEST = 43; strings.43 ='You have the Latest Version :)' MSG_INCHITS = 44; strings.44 ='hits may not be enough for the whole RECENT file*nShould it be Increased to a temporary length of 300 ?' MSG_NORECENT = 45; strings.45 ='Unable to download RECENT file :(' MSG_DAY = 46; strings.46 ='Day' HLP_REC = 47; strings.47 ='View the last 7 days*nRecent Uploads list' HLP_INF = 48; strings.48 ='Info window' HLP_XIT = 49; strings.49 ='Quit program' HLP_SCH = 50; strings.50 ='Start Search' HLP_VRM = 51; strings.51 ='Read the Readme file' HLP_GET = 52; strings.52 ='Download Selected File' HLP_PTN = 53; strings.53 ='Set search string' HLP_HIT = 54; strings.54 ='Maximum number of results' HLP_RME = 55; strings.55 ='Also get Readme file' HLP_DLP = 56; strings.56 ='Ask for new Download path' HLP_SNG = 57; strings.57 ='Aminet Site' HLP_LVW = 58; strings.58 ='Archive List' MSG_READREC = 59; strings.59 ='Parsing RECENT File' RETURN getfont: lfont='Topaz.font' lfsize=8; gfont='Topaz.font' ; gfsize=8; call open(th,'awnpipe:tooltypes/xi'prog) DO while ~eof(th) tln=readln(th) IF index(upper(tln),'GADGET_FONT=')==1 then parse var tln +12 gfont'/'gfsize . IF index(upper(tln),'LIST_FONT=')==1 then parse var tln +10 lfont'/'lfsize . end return